package com.istudy.service.imp;

import com.istudy.dao.xyjdao.impl.VideoImplDao;
import com.istudy.entity.Video;
import com.istudy.utils.JDBCUtils;

import java.sql.SQLException;
import java.util.List;

/**
 * 视频业务逻辑层
 *
 * @author xdd
 * @create 2020-08-24 16:59
 */
public class XYJVideoServiceImpl {

    VideoImplDao videoImplDao = new VideoImplDao(JDBCUtils.getConnection());//获取视频持久层对象

    /**
     * 根据视频类型id获取播放列表
     *
     * @return 视频播放列表
     */
    public List<Video> selectVideoAll(String videoType) {
        List<Video> videos = null;
        try {
            videos = videoImplDao.selectVideoAll(Integer.parseInt(videoType));

        } catch (SQLException e) {
            e.printStackTrace();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return videos;
    }


}
